package com.zyk.scaffold.tcp.enums;


import com.zyk.scaffold.common.basic.BasicErrorCode;
import com.zyk.scaffold.common.enums.ModuleEnum;

public enum TcpErrorCodeEnum implements BasicErrorCode {
    SERVER_INIT_ERROR(101,"服务初始化失败"),
    ;

    private final int code;

    private final String desc;

    private final int moduleCode = ModuleEnum.TCP.getCode();

    TcpErrorCodeEnum(int code, String desc) {
        this.code = ERROR_CODE_LEVEL * moduleCode + code;
        this.desc = desc;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return desc;
    }

}
